package com.mitake.parse;

import com.mitake.parse.WeekK.WeekKItem;
import com.mitake.utils.ParseUtil;

public class MitakeWeekK {
	
	public static WeekK parseWeekK(String src){
		WeekK weekk =new WeekK();
			String [] block03 = src.split(ParseUtil.SPLIT_0x03);
			for(int j=0; j<block03.length; j++){
				String[] block02 = block03[j].split(ParseUtil.SPLIT_0x02);
				WeekKItem weekKItem =new WeekKItem();
				weekKItem.date = ParseUtil.base93.getDecodeNumber(block02[0]);
				weekKItem.time = ParseUtil.base93.getDecodeNumber(block02[1]);
				weekKItem.firstPrice = ParseUtil.base93.getDecodeNumber(block02[2]);
				weekKItem.highPrice =  ParseUtil.base93.getDecodeNumber(block02[3]);
				weekKItem.lowPrice =   ParseUtil.base93.getDecodeNumber(block02[4]);
				weekKItem.lastPrice =  ParseUtil.base93.getDecodeNumber(block02[5]);
				weekKItem.volume =     ParseUtil.base93.getDecodeNumber(block02[6]);
				weekKItem.reference =  ParseUtil.base93.getDecodeNumber(block02[7]);
				weekk.weekKMap.put(weekKItem.date, weekKItem);
			}
			return weekk;
	}
	
}
